#ifndef LZW_H
#define LZW_H

#include <QObject>

class LZW : public QObject
{
    Q_OBJECT
public:
    explicit LZW(QObject *parent = 0);

    ~LZW();

       struct dict{                        //словарь
           int   code_value;
           int  prefix_code;
           char ch;
           };
        dict d[65535];
        unsigned char decode_stack[65535];

   private:
        unsigned short FindDictMatch(qint16,qint16);
        unsigned short DecodeString(qint16, qint16);
        void PutBits(unsigned short,unsigned short);
        void PutByte(unsigned char);
        unsigned short GetBits(unsigned short);
        unsigned char GetByte();
   public slots:
       void CompressFile(QString, QString);
       void DecompressFile(QString, QString);


};

#endif // LZW_H

